Blender Documentation Volume II - Reference Guide: Last modified March 29 2004 S68 | ||
---|---|---|
<<< Previous | Python API Reference | Next >>> |
This module provides access to Mesh Data objects in Blender.
Example:
import Blender from Blender import NMesh, Material # me = NMesh.GetRaw("Plane") # get the mesh data called "Plane" if not me.materials: # if there are no materials ... newmat = Material.New() # create one ... me.materials.append(newmat) # and append it to the mesh's list of mats print me.materials # print the list of materials mat = me.materials[0] # grab the first material in the list mat.R = 1.0 # redefine its red component for v in me.verts: # loop the list of vertices v.co[0] *= 2.5 # multiply the coordinates v.co[1] *= 5.0 v.co[2] *= 2.5 me.update() # update the real mesh in Blender |
Classes | ||
NMCol | This object is a list of ints: [r, g, b, a] representing an rgba colour. | |
NMesh | This object gives access to mesh data in Blender. | |
NMFace | This object holds mesh face data. | |
NMVert | This object holds mesh vertex data. |
Function Summary | ||
NMCol | Col(col) Get a new mesh rgba color. | |
NMFace | Face(vertexList) Get a new face object. | |
NMesh | GetRaw(name) Get the mesh data object called namefrom Blender. | |
NMesh | GetRawFromObject(name) Get the raw mesh data object from the Object in Blender called name. | |
á | New() Create a new mesh object. | |
None or Object | PutRaw(nmesh, name, recalculate_normals) Put an NMesh object back in Blender. | |
NMVert | Vert(x, y, z) Get a new vertex object. |
Variable Summary | ||
readonly dictionary | FaceFlags - The available face selection flags. | |
readonly dictionary | FaceModes - The available face modes. | |
readonly dictionary | FaceTranspModes - The available face transparency modes. |
Col(col=[255,á255,á255,á255]) Get a new mesh rgba color.
|
Face(vertexList=None) Get a new face object.
|
GetRaw(name=None) Get the mesh data object called name from Blender.
|
GetRawFromObject(name) Get the raw mesh data object from the Object in Blender called name.
|
PutRaw(nmesh, name=None, recalculate_normals=1) Put an NMesh object back in Blender.
|
Vert(x=0, y=0, z=0) Get a new vertex object.
|
FaceFlags The available face selection flags.
|
FaceModes The available face modes.
|
<<< Previous | Home | Next >>> |
Module NMesh | Up | Class NMCol |